<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ include file="../../common/taglibs.jsp"%>
<link rel="stylesheet" href="${rootPath}/resources/plugins/pagination/default.css" type="text/css">
<script type="text/javascript" src="${rootPath}/resources/js/jquery.min.js"></script>
<script type="text/javascript" src="${rootPath}/resources/plugins/pagination/jquery.pagination.js"></script>
<style type="text/css">

</style>
<table id="tablea"  class="list"   border="1" bordercolor="#a0c6e5" width="950"   style="border-collapse:collapse;">
    <thead>
    <tr>
        <th class="list" style="width: 20px">&nbsp;</th>
        <th class="list"  style="width: 150px">登录名</th>
        <th class="list" style="width: 150px">姓名</th>
        <th class="list" style="width: 150px">真实姓名</th>
        <th class="list">Email</th>
    </tr>
    </thead>
    <c:forEach var="item" items="${pageInfo.list}" varStatus="status">
        <tr <c:if test="${status.count%2==0}">class="listeven"</c:if>>
            <td class="list" style="width: 20px"><input type="checkbox" name="item_${status.count}"/></td>
            <td class="list" style="width: 150px">${item.loginName}</td>
            <td class="list" style="width: 150px">${item.userName}</td>
            <td class="list" style="width: 150px">${item.realName}</td>
            <td class="list">${item.email}</td>
        </tr>
    </c:forEach>
</table>
<div id="pagination-demo1" class="pager"></div>
<input type="hidden" name="pageNum" id="pageNum" value="${pageInfo.pageNum}"/>
<script type="text/javascript">
    var pro = new makeScrollableTablePro('tablea',true,'420');
    pro.makeScrollableTable();

    $(".pager").pagination({
        recordCount: ${pageInfo.total},       //总记录数
        pageSize: ${pageInfo.pageSize},           //一页记录数
        thisPageIndex: ${pageInfo.pageNum},
        onPageChange: function (pageIndex) {
            console.log(pageIndex);
            $("#pageNum").val(pageIndex);
            $("#searchBtn").click();
        }
    });
</script>